//对数据库进行操作
const mysqlPool=require('../config/mysqlPool');
module.exports={
  addUser(sql,arr,callback){
    mysqlPool.connect(sql,arr,function (err,data) {
      callback(err,data)
    })
  },
  login(arr,callback){
    mysqlPool.connect('select * from users where useremail=? and password=?',arr,function (err,data) {
      callback(err,data)
    })
  }
}